package org.scc.model;
/**
 * 人员组
 * @author rzpeng 
 *
 */
public class Group {
	/**
	 * 人员组
	 */
	public static final int USERGROUP = 1;
	/**
	 * 侍奉组
	 */
	public static final int WORSHIPGROUP = 2;
	private int id;
	private String name;
	private String remark;
	private User leader;
	/**
	 * 小组类型
	 * 分为人员组和侍奉组
	 * 人员组用来将团契里面的所有人员分组,名称就是第一组...
	 * 侍奉组将相同侍奉的人分在一组，如诗歌组、信息组等
	 */
	private int type;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public User getLeader() {
		return leader;
	}
	public void setLeader(User leader) {
		this.leader = leader;
	}
	
	public String getLeaderName(){
		if(leader != null){
			return leader.getName();
		} else {
			return "";
		}
	}
	
	public String getTypeText(){
		if(type == USERGROUP){
			return "人员组";
		} else {
			return "侍奉组";
		}
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	
}
